<template>
    <div>
        <list-header></list-header>
        <list-tag :list="description"></list-tag>
        <list-content :list="actList"></list-content>
    </div>
</template>

<script>
import ListHeader from './components/Header.vue'
import ListTag from './components/Tag.vue'
import ListContent from './components/Content.vue'
import axios from 'axios'
export default {
    name: 'List',
    props: {
        thirdId: String
    },
    components: {
        ListHeader,
        ListTag,
        ListContent
    },
    data () {
        return {
            description: [],
            actList:[]
        }
    },
    // mounted() {
    //  this.getData();
    // },
    // methods: {
    //  getData() {
    //      axios.get('/hotdetail', {
    //          params: {
    //              ID: this.id
    //              }
        //      })
        //          .then(this.getHotDetailInfoSucc)
                //    .catch(function (error) {
                //      console.log(error);
                //    });
    //  },
    //  getHotDetailInfoSucc(res) {
    //      res=res.data
    //      if (res.ret && res.data) {
    //          const data = res.data
    //          this.detailList = data
    //      }
    //  }
    // }
    methods: {
        getHotListInfo () {
            axios.get('/static/mock/list.json')
                .then(this.getHotListInfoSucc)
        },
        getHotListInfoSucc (res) {
            res = res.data
            if (res.ret && res.data) {
                 const data = res.data
                 this.description = data.description
                 this.actList = data.actList
            }else {
                alert('数据获取失败')
            }
             console.log(this.id3)
             //console.log(res)
        }
    },
    mounted () {
        this.getHotListInfo()
    }
}
</script>

<style>
    
</style>